package org.jeecg.modules.wlhy.hyinsurance.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.wlhy.hyinsurance.entity.InsuranceApplyRecord;
import org.jeecg.modules.wlhy.hyinsurance.mapper.InsuranceApplyRecordMapper;
import org.jeecg.modules.wlhy.hyinsurance.service.InsuranceApplyRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Yangqf
 * @since 2023-05-21
 */
@Service
public class InsuranceApplyRecordServiceImpl extends ServiceImpl<InsuranceApplyRecordMapper, InsuranceApplyRecord> implements InsuranceApplyRecordService {

    @Resource
    private InsuranceApplyRecordMapper applyRecordMapper;

    @Override
    public Page<InsuranceApplyRecord> selectApplyRecord(Page page, InsuranceApplyRecord record) {
        return applyRecordMapper.selectPage(page, Wrappers.<InsuranceApplyRecord>lambdaQuery().eq(StrUtil.isNotBlank(record.getShippingNum()),InsuranceApplyRecord::getShippingNum, record.getShippingNum()));
    }
}
